Skip to content

Conversation

paulrouget
Copy link
Contributor

A simple PR to suppress a warning:

warning: mjs/mjs.c:1949:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
warning: #if CS_ENABLE_STRDUP
warning:     ^
warning: mjs/mjs.c:1192:26: note: expanded from macro 'CS_ENABLE_STRDUP'
warning: #define CS_ENABLE_STRDUP defined(__ARMCC_VERSION)
warning:                          ^
warning: mjs/mjs.c:4598:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
warning: #if CS_ENABLE_STRDUP
warning:     ^
warning: mjs/mjs.c:1192:26: note: expanded from macro 'CS_ENABLE_STRDUP'
warning: #define CS_ENABLE_STRDUP defined(__ARMCC_VERSION)

Macro expansion producing 'defined' has undefined behavior.

As explained here:

https://stackoverflow.com/questions/42074035/how-to-deal-with-clangs-3-9-wexpansion-to-defined-warning?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Macro expansion producing 'defined' has undefined behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant